Skip to content

fix: gas tests with interest accrual (1186 vs dev)#1197

Draft
yan-man wants to merge 16 commits intofix/gas-testsfrom
rft/mint-fee-shares-2-gas
Draft

fix: gas tests with interest accrual (1186 vs dev)#1197
yan-man wants to merge 16 commits intofix/gas-testsfrom
rft/mint-fee-shares-2-gas

Conversation

@yan-man
Copy link
Contributor

@yan-man yan-man commented Feb 6, 2026

branched off #1186, vs dev

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

🌈 Test Results
No files changed, compilation skipped

Ran 14 tests for tests/gas/Spoke.Operations.gas.t.sol:SpokeOperations_ZeroRiskPremium_Gas_Tests
[PASS] test_borrow() (gas: 1379835)
[PASS] test_liquidation_full() (gas: 10705688)
[PASS] test_liquidation_partial() (gas: 10705105)
[PASS] test_liquidation_receiveShares_full() (gas: 10671925)
[PASS] test_liquidation_receiveShares_partial() (gas: 10671344)
[PASS] test_liquidation_reportDeficit_full() (gas: 10752050)
[PASS] test_multicall_ops() (gas: 1651508)
[PASS] test_repay() (gas: 821862)
[PASS] test_setUserPositionManagersWithSig() (gas: 315986)
[PASS] test_supply() (gas: 582140)
[PASS] test_updateRiskPremium() (gas: 942809)
[PASS] test_updateUserDynamicConfig() (gas: 593389)
[PASS] test_usingAsCollateral() (gas: 1109999)
[PASS] test_withdraw() (gas: 1623274)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 88.53ms (33.70ms CPU time)

Ran 4 tests for tests/unit/Spoke/Spoke.PermitReserve.t.sol:SpokePermitReserveTest
[PASS] test_permitReserve() (gas: 88227)
[PASS] test_permitReserve_forwards_correct_call() (gas: 35554)
[PASS] test_permitReserve_ignores_permit_reverts() (gas: 24390)
[PASS] test_permitReserve_revertsWith_ReserveNotListedIn() (gas: 22927)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 24.66ms (1.05ms CPU time)

Ran 2 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.CollateralToLiquidate.t.sol:LiquidationLogicCollateralToLiquidateTest
[PASS] test_calculateCollateralAmountToLiquidate() (gas: 166897)
[PASS] test_calculateCollateralToLiquidate_fuzz((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 196184, ~: 178869)
Logs:
  Bound result 0
  Bound result 10
  Bound result 200000000000
  Bound result 99000000000000000000000014439
  Bound result 1
  Bound result 18365
  Bound result 15
  Bound result 344
  Bound result 10079

Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 128.37ms (91.18ms CPU time)

Ran 20 tests for tests/unit/AaveOracle.t.sol:AaveOracleTest
[PASS] test_DECIMALS() (gas: 8326)
[PASS] test_constructor() (gas: 18428)
[PASS] test_description() (gas: 12039)
[PASS] test_fuzz_constructor(uint8) (runs: 5, μ: 20183, ~: 20214)
Logs:
  Bound result 3

[PASS] test_getReservePrice() (gas: 48776)
[PASS] test_getReservePrice_revertsWith_InvalidPrice() (gas: 48047)
[PASS] test_getReservePrice_revertsWith_InvalidSource() (gas: 10898)
[PASS] test_getReservePrices() (gas: 80715)
[PASS] test_getReservePrices_revertsWith_InvalidSource() (gas: 50930)
[PASS] test_getReserveSource() (gas: 48946)
[PASS] test_setReserveSource() (gas: 45988)
[PASS] test_setReserveSource_revertsWith_InvalidPrice() (gas: 102779)
[PASS] test_setReserveSource_revertsWith_InvalidSource() (gas: 17228)
[PASS] test_setReserveSource_revertsWith_InvalidSourceDecimals() (gas: 17065)
[PASS] test_setReserveSource_revertsWith_OnlySpoke() (gas: 13021)
[PASS] test_setReserveSource_revertsWith_OracleMismatch() (gas: 5010072)
[PASS] test_setSpoke() (gas: 5037974)
[PASS] test_setSpoke_revertsWith_InvalidAddress() (gas: 10870)
[PASS] test_setSpoke_revertsWith_OnlyDeployer(address) (runs: 5, μ: 13397, ~: 13397)
[PASS] test_setSpoke_revertsWith_SpokeAlreadySet() (gas: 15080)
Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 209.11ms (183.60ms CPU time)

Ran 10 tests for tests/unit/Spoke/Spoke.PositionManager.t.sol:SpokePositionManagerTest
[PASS] test_onlyPositionManager_on_borrow() (gas: 536997)
[PASS] test_onlyPositionManager_on_repay() (gas: 562284)
[PASS] test_onlyPositionManager_on_supply() (gas: 290236)
[PASS] test_onlyPositionManager_on_updateUserDynamicConfig() (gas: 1282646)
[PASS] test_onlyPositionManager_on_updateUserRiskPremium() (gas: 1518749)
[PASS] test_onlyPositionManager_on_usingAsCollateral() (gas: 144153)
[PASS] test_onlyPositionManager_on_withdraw() (gas: 318297)
[PASS] test_renouncePositionManagerRole() (gas: 20246)
[PASS] test_renouncePositionManagerRole_noop_from_disabled() (gas: 21860)
[PASS] test_setApprovalForPositionManager(bytes32) (runs: 5, μ: 18089, ~: 18089)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 112.39ms (89.05ms CPU time)

Ran 17 tests for tests/unit/AccessManagerEnumerable.t.sol:AccessManagerEnumerableTest
[PASS] test_getRoleMembers_fuzz(uint256,uint256) (runs: 5, μ: 1977371, ~: 1977224)
Logs:
  Bound result 8
  Bound result 10

[PASS] test_getRoleTargetSelectors_fuzz(uint256,uint256) (runs: 5, μ: 1525556, ~: 1525471)
Logs:
  Bound result 8
  Bound result 10

[PASS] test_grantRole() (gas: 315886)
[PASS] test_grantRole_fuzz(uint64,uint256) (runs: 5, μ: 894811, ~: 919753)
Logs:
  Bound result 2

[PASS] test_revokeRole() (gas: 323138)
[PASS] test_setRoleAdmin_fuzz_trackAdminRoles_multipleRoles_multipleAdmins(uint256) (runs: 5, μ: 1695874, ~: 1825652)
Logs:
  Bound result 4

[PASS] test_setRoleAdmin_fuzz_trackRolesAndTrackAdminRoles_multipleRoles(uint256) (runs: 5, μ: 1469939, ~: 1469938)
Logs:
  Bound result 4

[PASS] test_setRoleAdmin_trackAdminOfRoles() (gas: 606131)
[PASS] test_setRoleAdmin_trackAdminOfRoles_changeAdminRole() (gas: 577217)
[PASS] test_setRoleAdmin_trackAdminRoles() (gas: 602311)
[PASS] test_setRoleAdmin_trackRolesAndTrackAdminRoles() (gas: 378311)
[PASS] test_setRoleGuardian_trackRoles() (gas: 263932)
[PASS] test_setTargetFunctionRole() (gas: 414440)
[PASS] test_setTargetFunctionRole_multipleTargets() (gas: 1103911)
[PASS] test_setTargetFunctionRole_removeTarget() (gas: 894967)
[PASS] test_setTargetFunctionRole_skipAddToAdminRole() (gas: 30940)
[PASS] test_setTargetFunctionRole_withReplace() (gas: 549104)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 113.35ms (112.10ms CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.Repay.EdgeCases.t.sol:SpokeRepayEdgeCaseTest
[PASS] test_fuzz_repay_effect_on_ex_rates(uint256,uint256) (runs: 5, μ: 703236, ~: 706228)
Logs:
  Bound result 61535656045728715735036875056
  Bound result 685180691
  Bound result 136475009112242956586343982035

[PASS] test_repay_less_than_share() (gas: 608511)
[PASS] test_repay_only_base_debt_interest() (gas: 774550)
[PASS] test_repay_only_base_debt_no_premium() (gas: 652884)
[PASS] test_repay_supply_ex_rate_decr() (gas: 1458769)
[PASS] test_repay_supply_ex_rate_decr_skip_time() (gas: 1455290)
[PASS] test_repay_zero_shares_nonzero_premium_debt() (gas: 762805)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 136.17ms (111.40ms CPU time)

Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToLiquidate.t.sol:LiquidationLogicDebtToLiquidateTest
[PASS] test_calculateDebtToLiquidate_fuzz((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 39766, ~: 40179)
Logs:
  Bound result 27817417914151451884601
  Bound result 10794
  Bound result 2406
  Bound result 1296784785287246118
  Bound result 482897447027983936
  Bound result 9408548411028617
  Bound result 15
  Bound result 1000000000000000000000000000000
  Bound result 99026661368107885217517341611
  Bound result 103485765157
  Bound result 106286321362

[PASS] test_calculateDebtToLiquidate_fuzz_AmountAdjustedDueToDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 42423, ~: 43211)
Logs:
  Bound result 27817417914151451884601
  Bound result 10794
  Bound result 2406
  Bound result 1296784785287246118
  Bound result 482897447027983936
  Bound result 9408548411028617
  Bound result 15
  Bound result 1000000000000000000000000000000
  Bound result 99026661368107885217517341611
  Bound result 103485765157
  Bound result 106286321362
  Bound result 9408548411028617
  Bound result 2049991

[PASS] test_calculateDebtToLiquidate_fuzz_ImpossibleToAdjustForDust((uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 42086, ~: 42656)
Logs:
  Bound result 27817417914151451884601
  Bound result 10794
  Bound result 2406
  Bound result 1296784785287246118
  Bound result 482897447027983936
  Bound result 9408548411028617
  Bound result 15
  Bound result 1000000000000000000000000000000
  Bound result 99026661368107885217517341611
  Bound result 103485765157
  Bound result 106286321362
  Bound result 5
  Bound result 10000000000000000
  Bound result 103485765157

Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 277.59ms (253.98ms CPU time)

Ran 23 tests for tests/unit/AssetInterestRateStrategy.t.sol:AssetInterestRateStrategyTest
[PASS] test_calculateInterestRate_AtKinkPoint() (gas: 24326)
Logs:
  Bound result 2000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_AtMaxUtilization() (gas: 24621)
Logs:
  Bound result 10000
  Bound result 778565440757296803935461404101

[PASS] test_calculateInterestRate_LeftToKinkPoint(uint256) (runs: 5, μ: 24163, ~: 24330)
Logs:
  Bound result 911
  Bound result 652288372909708709858213579545

[PASS] test_calculateInterestRate_RightToKinkPoint(uint256) (runs: 5, μ: 25320, ~: 25351)
Logs:
  Bound result 8911
  Bound result 652288372909708709858213579545

[PASS] test_calculateInterestRate_ZeroDebtZeroLiquidity() (gas: 18771)
Logs:
  Bound result 0

[PASS] test_calculateInterestRate_fuzz_ZeroDebt(uint256) (runs: 5, μ: 18958, ~: 18822)
Logs:
  Bound result 1459440911

[PASS] test_calculateInterestRate_revertsWith_InterestRateDataNotSet() (gas: 11225)
[PASS] test_deploy_revertsWith_InvalidAddress() (gas: 3746)
[PASS] test_getBaseVariableBorrowRate() (gas: 14812)
[PASS] test_getInterestRateData() (gas: 19290)
[PASS] test_getMaxVariableBorrowRate() (gas: 15258)
[PASS] test_getOptimalUsageRatio() (gas: 14705)
[PASS] test_getVariableRateSlope1() (gas: 14791)
[PASS] test_getVariableRateSlope2() (gas: 14746)
[PASS] test_maxBorrowRate() (gas: 8312)
[PASS] test_maxOptimalRatio() (gas: 8312)
[PASS] test_minOptimalRatio() (gas: 8321)
[PASS] test_setInterestRateData() (gas: 68999)
[PASS] test_setInterestRateData_revertsWith_InvalidMaxRate() (gas: 41819)
[PASS] test_setInterestRateData_revertsWith_InvalidOptimalUsageRatio() (gas: 42380)
[PASS] test_setInterestRateData_revertsWith_InvalidRateData() (gas: 35269)
[PASS] test_setInterestRateData_revertsWith_OnlyHub() (gas: 23502)
[PASS] test_setInterestRateData_revertsWith_Slope2MustBeGteSlope1() (gas: 37658)
Suite result: ok. 23 passed; 0 failed; 0 skipped; finished in 204.58ms (192.75ms CPU time)

Ran 10 tests for tests/unit/misc/EIP712Hash.t.sol:EIP712HashTest
[PASS] test_constants() (gas: 13531)
[PASS] test_hash_borrow_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5, μ: 6805, ~: 6805)
[PASS] test_hash_positionManagerUpdate_fuzz((address,bool)) (runs: 5, μ: 6193, ~: 6193)
[PASS] test_hash_repay_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5, μ: 6806, ~: 6806)
[PASS] test_hash_setUserPositionManagers_fuzz((address,(address,bool)[],uint256,uint256)) (runs: 5, μ: 322956, ~: 350797)
[PASS] test_hash_setUsingAsCollateral_fuzz((address,uint256,bool,address,uint256,uint256)) (runs: 5, μ: 7305, ~: 7305)
[PASS] test_hash_supply_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5, μ: 6849, ~: 6849)
[PASS] test_hash_updateUserDynamicConfig_fuzz((address,address,uint256,uint256)) (runs: 5, μ: 6450, ~: 6450)
[PASS] test_hash_updateUserRiskPremium_fuzz((address,address,uint256,uint256)) (runs: 5, μ: 6471, ~: 6471)
[PASS] test_hash_withdraw_fuzz((address,uint256,uint256,address,uint256,uint256)) (runs: 5, μ: 6805, ~: 6805)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 84.87ms (84.42ms CPU time)

Ran 3 tests for tests/unit/misc/ExtSload.t.sol:ExtSloadTest
[PASS] test_extSload(bytes32) (runs: 5, μ: 9767, ~: 9767)
[PASS] test_extSloads(uint256) (runs: 5, μ: 882714, ~: 641902)
Logs:
  Bound result 940

[PASS] test_extSloads(uint256,bytes) (runs: 5, μ: 1071017, ~: 1204453)
Logs:
  Bound result 13

Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 105.13ms (104.83ms CPU time)

Ran 7 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.DebtToTargetHealthFactor.t.sol:LiquidationLogicDebtToTargetHealthFactorTest
[PASS] test_calculateDebtToTargetHealthFactor_HealthFactorEqualsTargetHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 23779, ~: 24051)
Logs:
  Bound result 7484638388661680898639593928834930651911
  Bound result 11343
  Bound result 1975
  Bound result 1000000000000000001
  Bound result 1
  Bound result 96968901737418
  Bound result 12

[PASS] test_calculateDebtToTargetHealthFactor_NoPrecisionLoss() (gas: 27855)
[PASS] test_calculateDebtToTargetHealthFactor_PrecisionLoss() (gas: 17346)
[PASS] test_calculateDebtToTargetHealthFactor_UnitPrice() (gas: 27855)
[PASS] test_calculateDebtToTargetHealthFactor_fuzz_NoRevert((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 20964, ~: 21177)
Logs:
  Bound result 7484638388661680898639593928834930651911
  Bound result 11343
  Bound result 1975
  Bound result 1000000000000000001
  Bound result 1
  Bound result 96968901737418
  Bound result 12

[PASS] test_calculateDebtToTargetHealthFactor_fuzz_revertsWith_DivisionByZero_ZeroAssetPrice((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 23288, ~: 23560)
Logs:
  Bound result 7484638388661680898639593928834930651911
  Bound result 11343
  Bound result 1975
  Bound result 1000000000000000001
  Bound result 1
  Bound result 96968901737418
  Bound result 12

[PASS] test_calculateDebtToTargetHealthFactor_revertsWith_ArithmeticError_TargetHealthFactorLessThanHealthFactor((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 23040, ~: 23312)
Logs:
  Bound result 7484638388661680898639593928834930651911
  Bound result 11343
  Bound result 1975
  Bound result 1000000000000000001
  Bound result 1
  Bound result 96968901737418
  Bound result 12

Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 381.38ms (351.85ms CPU time)

Ran 16 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.EvaluateDeficit.t.sol:LiquidationLogicEvaluateDeficitTest
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCM() (gas: 8928)
[PASS] test_evaluateDeficit_CRE_SCCM_DRE_BRCO() (gas: 8896)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCM() (gas: 8917)
[PASS] test_evaluateDeficit_CRE_SCCM_DRN_BRCO() (gas: 8884)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCM() (gas: 8910)
[PASS] test_evaluateDeficit_CRE_SCCO_DRE_BRCO() (gas: 8977)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCM() (gas: 8942)
[PASS] test_evaluateDeficit_CRE_SCCO_DRN_BRCO() (gas: 8930)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCM() (gas: 8930)
[PASS] test_evaluateDeficit_CRN_SCCM_DRE_BRCO() (gas: 8919)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCM() (gas: 8853)
[PASS] test_evaluateDeficit_CRN_SCCM_DRN_BRCO() (gas: 8886)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCM() (gas: 8863)
[PASS] test_evaluateDeficit_CRN_SCCO_DRE_BRCO() (gas: 8920)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCM() (gas: 8871)
[PASS] test_evaluateDeficit_CRN_SCCO_DRN_BRCO() (gas: 8949)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 27.09ms (1.26ms CPU time)

Ran 8 tests for tests/unit/misc/GatewayBase.t.sol:GatewayBaseTest
[PASS] test_constructor() (gas: 17151)
[PASS] test_registerSpoke_fuzz(address) (runs: 5, μ: 41629, ~: 41629)
[PASS] test_registerSpoke_revertsWith_InvalidAddress() (gas: 13119)
[PASS] test_registerSpoke_revertsWith_OwnableUnauthorizedAccount() (gas: 13791)
[PASS] test_registerSpoke_unregister() (gas: 36076)
[PASS] test_renouncePositionManagerRole() (gas: 65249)
[PASS] test_renouncePositionManagerRole_revertsWith_InvalidAddress() (gas: 74198)
[PASS] test_renouncePositionManagerRole_revertsWith_OwnableUnauthorizedAccount() (gas: 74417)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 109.71ms (85.43ms CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ExecuteLiquidation.t.sol:LiquidationLogicExecuteLiquidationTest
[PASS] test_executeLiquidation() (gas: 364177)
[PASS] test_executeLiquidation_revertsWith_InvalidDebtToCover() (gas: 81094)
[PASS] test_executeLiquidation_revertsWith_MustNotLeaveDust_Collateral() (gas: 140805)
[PASS] test_executeLiquidation_revertsWith_MustNotLeaveDust_Debt() (gas: 141567)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 33.18ms (1.61ms CPU time)

Ran 5 tests for tests/gas/Gateways.Operations.gas.t.sol:NativeTokenGateway_Gas_Tests
[PASS] test_borrowNative() (gas: 930115)
[PASS] test_repayNative() (gas: 1000490)
[PASS] test_supplyAndCollateralNative() (gas: 308540)
[PASS] test_supplyNative() (gas: 288745)
[PASS] test_withdrawNative() (gas: 513929)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 48.85ms (4.50ms CPU time)

Ran 8 tests for tests/gas/Gateways.Operations.gas.t.sol:SignatureGateway_Gas_Tests
[PASS] test_borrowWithSig() (gas: 645751)
[PASS] test_repayWithSig() (gas: 879500)
[PASS] test_setSelfAsUserPositionManagerWithSig() (gas: 205811)
[PASS] test_setUsingAsCollateralWithSig() (gas: 226656)
[PASS] test_supplyWithSig() (gas: 431957)
[PASS] test_updateUserDynamicConfigWithSig() (gas: 222433)
[PASS] test_updateUserRiskPremiumWithSig() (gas: 220098)
[PASS] test_withdrawWithSig() (gas: 473127)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 67.71ms (8.72ms CPU time)

Ran 3 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateCollateral.t.sol:LiquidationLogicLiquidateCollateralTest
[PASS] test_liquidateCollateral_fuzz(uint256,uint256,bool) (runs: 5, μ: 220792, ~: 235090)
Logs:
  Bound result 56473442242201527199
  Bound result 16911371606172480067

[PASS] test_liquidateCollateral_revertsWith_ArithmeticUnderflow() (gas: 28059)
[PASS] test_liquidateCollateral_revertsWith_ArithmeticUnderflow_FeeShares() (gas: 134074)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 110.81ms (81.10ms CPU time)

Ran 6 tests for tests/unit/Hub/Hub.Access.t.sol:HubAccessTest
[PASS] test_change_authority() (gas: 204058)
[PASS] test_change_role_responsibility() (gas: 108216)
[PASS] test_hub_access_manager_exposure() (gas: 13417)
[PASS] test_hub_admin_access() (gas: 1347551)
[PASS] test_migrate_role_responsibility() (gas: 695216)
[PASS] test_setInterestRateData_access() (gas: 102003)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 27.96ms (3.92ms CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateDebt.t.sol:LiquidationLogicLiquidateDebtTest
[PASS] test_liquidateDebt_fuzz(uint256) (runs: 5, μ: 235244, ~: 231136)
[PASS] test_liquidateDebt_revertsWith_ArithmeticUnderflow() (gas: 106343)
[PASS] test_liquidateDebt_revertsWith_InsufficientAllowance() (gas: 118848)
[PASS] test_liquidateDebt_revertsWith_InsufficientBalance() (gas: 177343)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 114.45ms (88.64ms CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidateUser.t.sol:LiquidationLogicLiquidateUserTest
[PASS] test_liquidateUser() (gas: 365264)
[PASS] test_liquidateUser_revertsWith_InvalidDebtToCover() (gas: 73873)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Collateral() (gas: 137602)
[PASS] test_liquidateUser_revertsWith_MustNotLeaveDust_Debt() (gas: 142405)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 33.06ms (1.75ms CPU time)

Ran 8 tests for tests/unit/Spoke/Spoke.Repay.Scenario.t.sol:SpokeRepayScenarioTest
[PASS] test_fuzz_repay_borrow_twice_repay_twice((uint256,uint256,uint256,uint40),(uint256,uint256,uint256,uint40)) (runs: 5, μ: 1267388, ~: 1268269)
Logs:
  Bound result 208367672
  Bound result 540294
  Bound result 109623245259112484576750683753
  Bound result 1263
  Bound result 50354475879357019595435741496
  Bound result 263

[PASS] test_fuzz_repay_multiple_users_repay_same_reserve((uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),uint256) (runs: 5, μ: 1999791, ~: 1999374)
Logs:
  Bound result 35521638
  Bound result 81176203421215730985692698427786438291
  Bound result 119010746400778280078724075902
  Bound result 262619362825411379252910
  Bound result 17949190939892888153940303291
  Bound result 80950826076510664087
  Bound result 684334482

[PASS] test_repay_fuzz_multiple_users_multiple_assets(((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),uint40) (runs: 5, μ: 6060839, ~: 6060336)
Logs:
  Bound result 98469853108740220498148447521
  Bound result 131982024
  Bound result 116517399225526502
  Bound result 12499999999999999997
  Bound result 1341942651957904745192234737585088609230901175536654532
  Bound result 17438016466678753943887865820728
  Bound result 751328689291
  Bound result 157988295730145263148275090
  Bound result 2275759165667927916113
  Bound result 1
  Bound result 8452575918
  Bound result 2834348807251805636
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639932
  Bound result 61231253981096557722913982151550825151251736391110
  Bound result 1
  Bound result 216784
  Bound result 62426079198912245280213750863
  Bound result 31595595582394787544090247671
  Bound result 83711669789667461
  Bound result 2304011979587570615
  Bound result 455813684847602087077913799822870
  Bound result 61723456009873286998989343243341918836877216564666029
  Bound result 72682129539799449189227775289771251484
  Bound result 246462844000269
  Bound result 1

[PASS] test_repay_fuzz_two_users_multiple_assets(((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),((uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256),address),uint40) (runs: 5, μ: 4298051, ~: 4298240)
Logs:
  Bound result 661
  Bound result 517440283
  Bound result 95000000000000000
  Bound result 1569269460945590956
  Bound result 13605
  Bound result 1000000000000000000000000000000
  Bound result 11000
  Bound result 88178246048520217165587392110952120860011095696532256173385468787376852566015
  Bound result 30000000000000000000000
  Bound result 710
  Bound result 11903
  Bound result 11500000000000000000
  Bound result 12500000000000000000000000000000000000000000000000000000000000000000000000000
  Bound result 509019607843137254
  Bound result 999900000000000000
  Bound result 4405
  Bound result 1875

[PASS] test_repay_partial_then_max() (gas: 699743)
[PASS] test_repay_round_trip_borrow_repay(uint256,uint256,uint40,address,uint256) (runs: 5, μ: 876810, ~: 878758)
Logs:
  Bound result 4
  Bound result 498297531617148238517417
  Bound result 465835
  Bound result 381479558105923253984856784849

[PASS] test_repay_round_trip_repay_borrow(uint256,uint256,uint256,uint40,address,uint256) (runs: 5, μ: 958727, ~: 960037)
Logs:
  Bound result 1
  Bound result 42731252303345670488
  Bound result 1402
  Bound result 1
  Bound result 1160890843375591607

[PASS] test_repay_two_users_repay_same_reserve((uint256,uint256,uint256,uint256,uint256,uint256,address),(uint256,uint256,uint256,uint256,uint256,uint256,address),uint256) (runs: 5, μ: 1497811, ~: 1497328)
Logs:
  Bound result 51357815211658894582790524924
  Bound result 102849095086241930933158640
  Bound result 124118994424291570164731570623
  Bound result 310722473864281185330171465074883744373909089061156469175077
  Bound result 47

Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 874.30ms (850.84ms CPU time)

Ran 2 tests for tests/unit/Spoke/Spoke.Repay.Validation.t.sol:SpokeRepayValidationTest
[PASS] test_repay_revertsWith_ReserveNotListed() (gas: 23184)
[PASS] test_repay_revertsWith_ReservePaused() (gas: 63682)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 33.73ms (409.74µs CPU time)

Ran 19 tests for tests/unit/Hub/Hub.Add.t.sol:HubAddTest
[PASS] test_add_AddCapReachedButNotExceeded_rounding() (gas: 671705)
[PASS] test_add_fuzz_AddCapReachedButNotExceeded(uint40) (runs: 5, μ: 158943, ~: 158943)
Logs:
  Bound result 9435

[PASS] test_add_fuzz_multi_asset_multi_spoke(uint256,uint256,uint256) (runs: 5, μ: 330134, ~: 329759)
Logs:
  Bound result 2
  Bound result 276197703734924979325426575862
  Bound result 4896747

[PASS] test_add_fuzz_revertsWith_AddCapExceeded(uint40) (runs: 5, μ: 112127, ~: 112127)
Logs:
  Bound result 9435

[PASS] test_add_fuzz_revertsWith_AddCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5, μ: 274414, ~: 274687)
Logs:
  Bound result 476358262
  Bound result 386270036924979325426576441
  Bound result 4896747

[PASS] test_add_fuzz_revertsWith_InvalidShares_due_to_index(uint256,uint256,uint256) (runs: 5, μ: 228135, ~: 228137)
Logs:
  Bound result 740130867392857144266204334010
  Bound result 3126960748
  Bound result 10

[PASS] test_add_fuzz_single_asset(uint256,address,uint256) (runs: 5, μ: 341201, ~: 341274)
Logs:
  Bound result 2
  Bound result 1466075083157903748843

[PASS] test_add_fuzz_single_spoke_multi_add(uint256,uint256) (runs: 5, μ: 809777, ~: 808508)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 803723176

[PASS] test_add_multi_add_minimal_shares() (gas: 331694)
[PASS] test_add_revertsWith_AmountDowncastOverflow() (gas: 359674)
[PASS] test_add_revertsWith_InsufficientTransferred() (gas: 64492)
[PASS] test_add_revertsWith_InvalidAmount() (gas: 13619)
[PASS] test_add_revertsWith_InvalidShares() (gas: 228035)
[PASS] test_add_revertsWith_SharesDowncastOverflow() (gas: 224061)
[PASS] test_add_revertsWith_SpokeHalted() (gas: 99583)
[PASS] test_add_revertsWith_SpokeNotActive() (gas: 99619)
[PASS] test_add_single_asset() (gas: 329140)
Logs:
  Bound result 2
  Bound result 100000000000000000000

[PASS] test_add_with_increased_index() (gas: 311603)
[PASS] test_add_with_increased_index_with_premium() (gas: 685202)
Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 603.88ms (579.16ms CPU time)

Ran 8 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationAmounts.t.sol:LiquidationLogicLiquidationAmountsTest
[PASS] test_calculateLiquidationAmounts_EnoughCollateral() (gas: 168394)
[PASS] test_calculateLiquidationAmounts_InsufficientCollateral() (gas: 169122)
[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_CollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 275682, ~: 275333)
Logs:
  Bound result 365448755728163590
  Bound result 24
  Bound result 69965119113623865
  Bound result 11473
  Bound result 9
  Bound result 476064849280271667429369734467949596086748031206405307828953139284
  Bound result 11473
  Bound result 5391
  Bound result 1049767079792608675
  Bound result 69965119113623865
  Bound result 3307148893
  Bound result 12
  Bound result 95588826644
  Bound result 80977496854448293501980409439
  Bound result 149594988585848
  Bound result 302375258070970
  Bound result 6491011603397232
  Bound result 8
  Bound result 9998
  Bound result 879212170809003673237450766514
  Bound result 4
  Bound result 6491011603397232
  Bound result 19109732003961
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935

[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoCollateralDust((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 229734, ~: 229933)
Logs:
  Bound result 365448755728163590
  Bound result 24
  Bound result 69965119113623865
  Bound result 11473
  Bound result 9
  Bound result 476064849280271667429369734467949596086748031206405307828953139284
  Bound result 11473
  Bound result 5391
  Bound result 1049767079792608675
  Bound result 69965119113623865
  Bound result 3307148893
  Bound result 12
  Bound result 95588826644
  Bound result 80977496854448293501980409439
  Bound result 149594988585848
  Bound result 302375258070970
  Bound result 6491011603397232
  Bound result 8
  Bound result 9998
  Bound result 879212170809003673237450766514
  Bound result 4
  Bound result 879212170809003673237450766514
  Bound result 95588826644

[PASS] test_calculateLiquidationAmounts_fuzz_EnoughCollateral_NoDebtLeft((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 249969, ~: 249827)
Logs:
  Bound result 365448755728163590
  Bound result 24
  Bound result 69965119113623865
  Bound result 11473
  Bound result 9
  Bound result 476064849280271667429369734467949596086748031206405307828953139284
  Bound result 11473
  Bound result 5391
  Bound result 1049767079792608675
  Bound result 69965119113623865
  Bound result 3307148893
  Bound result 12
  Bound result 95588826644
  Bound result 80977496854448293501980409439
  Bound result 149594988585848
  Bound result 302375258070970
  Bound result 6491011603397232
  Bound result 8
  Bound result 9998
  Bound result 879212170809003673237450766514
  Bound result 4
  Bound result 476064849280271667429369734467949596086748031206405307828953139284
  Bound result 11473
  Bound result 5391
  Bound result 1049767079792608675
  Bound result 69965119113623865
  Bound result 3307148893
  Bound result 12
  Bound result 95588826644
  Bound result 80977496854448293501980409439
  Bound result 149594988585848
  Bound result 302375258070970
  Bound result 3307148893
  Bound result 14547727928
  Bound result 879212170809003673237450766514
  Bound result 115792089237316195423570985008687907853269984665640564039457584006578315812069

[PASS] test_calculateLiquidationAmounts_fuzz_InsufficientCollateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 236363, ~: 235166)
Logs:
  Bound result 715987407764261936
  Bound result 4763
  Bound result 748308345668368121
  Bound result 14683
  Bound result 7
  Bound result 17926437574775980793467271743239713
  Bound result 14403
  Bound result 1
  Bound result 1299379906352973925
  Bound result 748308345668368121
  Bound result 5516941123680586
  Bound result 10
  Bound result 118
  Bound result 99000000000000000000000005589
  Bound result 1764727
  Bound result 805995
  Bound result 10000000000000000
  Bound result 7
  Bound result 5144
  Bound result 291129815709901057244520380257
  Bound result 1
  Bound result 36
  Bound result 118

[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Collateral((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 258270, ~: 257803)
Logs:
  Bound result 365448755728163590
  Bound result 24
  Bound result 69965119113623865
  Bound result 11473
  Bound result 9
  Bound result 476064849280271667429369734467949596086748031206405307828953139284
  Bound result 11473
  Bound result 5391
  Bound result 1049767079792608675
  Bound result 69965119113623865
  Bound result 3307148893
  Bound result 12
  Bound result 95588826644
  Bound result 80977496854448293501980409439
  Bound result 149594988585848
  Bound result 302375258070970
  Bound result 6491011603397232
  Bound result 8
  Bound result 9998
  Bound result 879212170809003673237450766514
  Bound result 4
  Bound result 6491011603397232
  Bound result 19109732003961
  Bound result 115792089237316195423570985008687907853269984665640564039457584007913129639935

[PASS] test_calculateLiquidationAmounts_fuzz_revertsWith_MustNotLeaveDust_Debt((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) (runs: 5, μ: 241664, ~: 240903)
Logs:
  Bound result 365448755728163590
  Bound result 24
  Bound result 69965119113623865
  Bound result 11473
  Bound result 9
  Bound result 476064849280271667429369734467949596086748031206405307828953139284
  Bound result 11473
  Bound result 5391
  Bound result 1049767079792608675
  Bound result 69965119113623865
  Bound result 3307148893
  Bound result 12
  Bound result 95588826644
  Bound result 80977496854448293501980409439
  Bound result 149594988585848
  Bound result 302375258070970
  Bound result 6491011603397232
  Bound result 8
  Bound result 9998
  Bound result 879212170809003673237450766514
  Bound result 4
  Bound result 476064849280271667429369734467949596086748031206405307828953139284
  Bound result 11473
  Bound result 5391
  Bound result 1049767079792608675
  Bound result 69965119113623865
  Bound result 3307148893
  Bound result 12
  Bound result 95588826644
  Bound result 80977496854448293501980409439
  Bound result 149594988585848
  Bound result 302375258070970
  Bound result 3307148893
  Bound result 14547727928

Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 570.67ms (547.29ms CPU time)

Ran 4 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.LiquidationBonus.t.sol:LiquidationLogicLiquidationBonusTest
[PASS] test_calculateLiquidationBonus_MinBonusDueToRounding() (gas: 12466)
[PASS] test_calculateLiquidationBonus_PartialBonus() (gas: 12487)
[PASS] test_calculateLiquidationBonus_fuzz_ConstantBonus(uint256,uint256,uint256,uint256) (runs: 5, μ: 20478, ~: 20648)
Logs:
  Bound result 240336
  Bound result 2682
  Bound result 715740573453180691
  Bound result 12699

[PASS] test_calculateLiquidationBonus_fuzz_MaxBonus(uint256,uint256,uint256,uint256) (runs: 5, μ: 23412, ~: 23590)
Logs:
  Bound result 240336
  Bound result 2682
  Bound result 715740573453180691
  Bound result 12699
  Bound result 212406

Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 198.74ms (174.38ms CPU time)

Ran 11 tests for tests/unit/libraries/LiquidationLogic/LiquidationLogic.ValidateLiquidationCall.t.sol:LiquidationLogicValidateLiquidationCallTest
[PASS] test_validateLiquidationCall() (gas: 26036)
[PASS] test_validateLiquidationCall_revertsWith_CannotReceiveShares() (gas: 259738)
[PASS] test_validateLiquidationCall_revertsWith_HealthFactorNotBelowThreshold() (gas: 31769)
[PASS] test_validateLiquidationCall_revertsWith_InvalidDebtToCover() (gas: 26861)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotBorrowed() (gas: 26980)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_NotUsingAsCollateral() (gas: 27033)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotEnabledAsCollateral_ZeroCollateralFactor() (gas: 27018)
[PASS] test_validateLiquidationCall_revertsWith_ReserveNotSupplied() (gas: 26947)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_CollateralPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_ReservePaused_DebtPaused() (gas: 31989)
[PASS] test_validateLiquidationCall_revertsWith_SelfLiquidation() (gas: 33724)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 25.17ms (1.48ms CPU time)

Ran 17 tests for tests/unit/Spoke/Spoke.Repay.t.sol:SpokeRepayTest
[PASS] test_fuzz_amounts_repay_only_premium(uint256,uint256,uint40) (runs: 5, μ: 895069, ~: 896836)
Logs:
  Bound result 28440373319405028386003002998
  Bound result 3
  Bound result 20793798235469357046

[PASS] test_fuzz_repay_amounts_only_interest(uint256,uint256,uint40) (runs: 5, μ: 901817, ~: 904493)
Logs:
  Bound result 28440373319405028386003002998
  Bound result 3
  Bound result 284581507391107100921

[PASS] test_fuzz_repay_only_premium(uint256,uint40) (runs: 5, μ: 761048, ~: 764752)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 11051
  Bound result 1

[PASS] test_fuzz_repay_same_block_fuzz_amounts(uint256,uint256) (runs: 5, μ: 825407, ~: 908390)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 11051

[PASS] test_fuzz_repay_x_y_shares(uint256,uint40) (runs: 5, μ: 624551, ~: 627641)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 11051

[PASS] test_repay() (gas: 710255)
[PASS] test_repay_all_with_accruals() (gas: 426295)
[PASS] test_repay_fuzz_amountsAndWait(uint256,uint256,uint40) (runs: 5, μ: 943069, ~: 944827)
Logs:
  Bound result 28440373319405028386003002998
  Bound result 20234343860279723851399548880
  Bound result 3

[PASS] test_repay_fuzz_amounts_base_debt(uint256,uint256,uint40) (runs: 5, μ: 966618, ~: 968532)
Logs:
  Bound result 28440373319405028386003002998
  Bound result 3
  Bound result 345455594119315262362

[PASS] test_repay_fuzz_amounts_base_debt_no_premium(uint256,uint256,uint40) (runs: 5, μ: 837812, ~: 839649)
Logs:
  Bound result 28440373319405028386003002998
  Bound result 3
  Bound result 345455594119315262362

[PASS] test_repay_fuzz_revertsWith_ERC20InsufficientBalance(uint256) (runs: 5, μ: 551364, ~: 551228)
Logs:
  Bound result 9619

[PASS] test_repay_max() (gas: 606627)
[PASS] test_repay_multiple_reserves_fuzz_amountsAndWait(uint256,uint256,uint256,uint256,uint256,uint40) (runs: 5, μ: 3363582, ~: 3364667)
Logs:
  Bound result 1
  Bound result 2
  Bound result 384967423069528117
  Bound result 10698868285874488444
  Bound result 8570
  Bound result 386709

[PASS] test_repay_only_interest() (gas: 734307)
[PASS] test_repay_revertsWith_ERC20InsufficientAllowance() (gas: 553949)
[PASS] test_repay_revertsWith_ReentrancyGuardReentrantCall() (gas: 649775)
[PASS] test_repay_same_block() (gas: 679154)
Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 995.28ms (971.60ms CPU time)

Ran 5 tests for tests/unit/Spoke/Spoke.ReserveConfig.t.sol:SpokeReserveConfigTest
[PASS] test_borrow_fuzz_borrowable_paused_frozen_scenarios(bool,bool,bool) (runs: 5, μ: 254212, ~: 254192)
[PASS] test_repay_fuzz_paused_scenarios(bool) (runs: 5, μ: 550017, ~: 548912)
[PASS] test_setUsingAsCollateral_fuzz_paused_frozen_scenarios(bool) (runs: 5, μ: 184059, ~: 184069)
[PASS] test_supply_paused_frozen_scenarios() (gas: 321032)
[PASS] test_withdraw_paused_scenarios() (gas: 292297)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 282.07ms (257.64ms CPU time)

Ran 5 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.EdgeCases.t.sol:SpokeAccrueLiquidityFeeEdgeCasesTest
[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium(uint256,uint256,uint256,uint256) (runs: 5, μ: 531532, ~: 531709)
Logs:
  Bound result 70955
  Bound result 685180691
  Bound result 1
  Bound result 45728715735036875056

[PASS] test_accrueLiquidityFee_fuzz_maxLiquidityFee_with_premium_multiple_users(uint256,uint256,uint256,uint256,uint256) (runs: 5, μ: 784722, ~: 785131)
Logs:
  Bound result 67549
  Bound result 800062139
  Bound result 4
  Bound result 89473879703452351689256785169
  Bound result 47938669350974575399012617271

[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_spoke() (gas: 528368255)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_multi_user() (gas: 230853749)
[PASS] test_accrueLiquidityFee_maxLiquidityFee_with_premium() (gas: 531441)
Logs:
  Bound result 5000
  Bound result 34560000
  Bound result 2
  Bound result 500000000000000000000

Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 2.60s (2.58s CPU time)

Ran 28 tests for tests/unit/MathUtils.t.sol:MathUtilsTest
[PASS] test_add_edge_cases() (gas: 4679)
[PASS] test_add_negative_operand(uint256,int256) (runs: 5, μ: 9039, ~: 8816)
Logs:
  Bound result -347324752816465037774479

[PASS] test_add_positive_operand(uint256,int256) (runs: 5, μ: 3916, ~: 3916)
[PASS] test_calculateLinearInterest() (gas: 4368)
[PASS] test_calculateLinearInterest_add_edge() (gas: 4890)
[PASS] test_calculateLinearInterest_edge_cases() (gas: 16246)
Logs:
  Bound result 0
  Bound result 1
  Bound result 864000000
  Bound result 864000000

[PASS] test_calculateLinearInterest_reverts_on_past_timestamp(uint40) (runs: 5, μ: 7653, ~: 7381)
Logs:
  Bound result 1047

[PASS] test_constants() (gas: 3110)
[PASS] test_fuzz_calculateLinearInterest(uint96,uint40,uint256) (runs: 5, μ: 8551, ~: 8824)
Logs:
  Bound result 4896747

[PASS] test_fuzz_divUp(uint256,uint256) (runs: 5, μ: 3544, ~: 3544)
[PASS] test_fuzz_mulDivDown(uint256,uint256,uint256) (runs: 5, μ: 3476, ~: 3409)
[PASS] test_fuzz_mulDivUp(uint256,uint256,uint256) (runs: 5, μ: 3509, ~: 3367)
[PASS] test_min(uint256,uint256) (runs: 5, μ: 3281, ~: 3282)
[PASS] test_mulDivDown_NoRemainder() (gas: 3223)
[PASS] test_mulDivDown_RevertOnDivByZero() (gas: 3107)
[PASS] test_mulDivDown_RevertOnOverflow() (gas: 3183)
[PASS] test_mulDivDown_WithRemainder() (gas: 3268)
[PASS] test_mulDivDown_ZeroAOrB() (gas: 3721)
[PASS] test_mulDivUp_NoRemainder() (gas: 3249)
[PASS] test_mulDivUp_RevertOnDivByZero() (gas: 3084)
[PASS] test_mulDivUp_RevertOnOverflow() (gas: 3140)
[PASS] test_mulDivUp_WithRemainder() (gas: 3248)
[PASS] test_mulDivUp_ZeroAOrB() (gas: 3792)
[PASS] test_signedSub(uint256,uint256) (runs: 5, μ: 8666, ~: 8530)
Logs:
  Bound result 38088019639628816452705211337534894291302262850251721590154004630696097410295
  Bound result 11903

[PASS] test_signedSub_revertsWith_SafeCastOverflowedUintToInt(uint256) (runs: 5, μ: 7702, ~: 7702)
Logs:
  Bound result 57896044618658097711785492504343953926634992332820282019728792003956564821015

[PASS] test_uncheckedAdd(uint256,uint256) (runs: 5, μ: 3438, ~: 3438)
[PASS] test_uncheckedExp(uint256,uint256) (runs: 5, μ: 12218, ~: 6218)
[PASS] test_uncheckedSub(uint256,uint256) (runs: 5, μ: 3460, ~: 3526)
Suite result: ok. 28 passed; 0 failed; 0 skipped; finished in 882.20ms (870.16ms CPU time)

Ran 7 tests for tests/unit/Spoke/Spoke.AccrueLiquidityFee.t.sol:SpokeAccrueLiquidityFeeTest
[PASS] test_accrueLiquidityFee() (gas: 824689)
[PASS] test_accrueLiquidityFee_NoActionTaken() (gas: 123593)
[PASS] test_accrueLiquidityFee_NoInterest_OnlySupply(uint40) (runs: 5, μ: 246351, ~: 246624)
Logs:
  Bound result 9963

[PASS] test_accrueLiquidityFee_exact() (gas: 820017)
[PASS] test_accrueLiquidityFee_fuzz_BorrowAmountAndSkipTime(uint256,uint40) (runs: 5, μ: 842038, ~: 817148)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 12681

[PASS] test_accrueLiquidityFee_maxLiquidityFee() (gas: 532465)
[PASS] test_accrueLiquidityFee_setUsingAsCollateral() (gas: 870618)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 215.28ms (188.73ms CPU time)

Ran 5 tests for tests/unit/Spoke/Spoke.Borrow.EdgeCases.t.sol:SpokeBorrowEdgeCasesTest
[PASS] test_borrow_fuzz_rounding_effect(uint256,uint256) (runs: 5, μ: 1038951, ~: 1039088)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 14427

[PASS] test_borrow_fuzz_rounding_effect_inflated_ex_rate(uint256,uint256,uint256) (runs: 5, μ: 1419975, ~: 1419431)
Logs:
  Bound result 74997624532618222526737
  Bound result 808603654431988792687712
  Bound result 52522171

[PASS] test_borrow_fuzz_rounding_effect_shares(uint256,uint256) (runs: 5, μ: 1091658, ~: 1091386)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 832478428

[PASS] test_borrow_rounding_effect_multiple_actions() (gas: 1152949)
[PASS] test_borrow_rounding_effect_shares() (gas: 1090648)
Logs:
  Bound result 5000000000000000000
  Bound result 94608000

Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 343.64ms (320.00ms CPU time)

Ran 37 tests for tests/unit/Hub/Hub.Config.t.sol:HubConfigTest
[PASS] test_addAsset_fuzz(address,uint8,address) (runs: 5, μ: 389233, ~: 389279)
Logs:
  Bound result 18

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_feeReceiver(address,uint8,address) (runs: 5, μ: 45370, ~: 45643)
Logs:
  Bound result 1

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_irStrategy(address,uint8,address) (runs: 5, μ: 45413, ~: 45686)
Logs:
  Bound result 1

[PASS] test_addAsset_fuzz_revertsWith_InvalidAddress_underlying(uint8,address,address) (runs: 5, μ: 36666, ~: 36666)
[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals(address,uint8,address,address) (runs: 5, μ: 45923, ~: 45955)
Logs:
  Bound result 21

[PASS] test_addAsset_fuzz_revertsWith_InvalidAssetDecimals_tooLow(address,uint8,address,address) (runs: 5, μ: 46019, ~: 46171)
Logs:
  Bound result 2

[PASS] test_addAsset_fuzz_reverts_InvalidIrData(address,uint8,address,address) (runs: 5, μ: 47369, ~: 34910)
Logs:
  Bound result 2

[PASS] test_addAsset_revertsWith_BlockTimestampDowncastOverflow() (gas: 956623)
[PASS] test_addAsset_revertsWith_DrawnRateDowncastOverflow() (gas: 953756)
[PASS] test_addAsset_reverts_UnderlyingAlreadyListed() (gas: 48905)
[PASS] test_addSpoke_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5, μ: 126592, ~: 126616)
Logs:
  Bound result 1

[PASS] test_addSpoke_fuzz_revertsWith_AssetNotListed(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5, μ: 35255, ~: 35255)
Logs:
  Bound result 13

[PASS] test_addSpoke_fuzz_revertsWith_InvalidAddress_spoke(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5, μ: 33889, ~: 33913)
Logs:
  Bound result 1

[PASS] test_addSpoke_revertsWith_SpokeAlreadyListed() (gas: 39752)
[PASS] test_getAssetId() (gas: 73028)
[PASS] test_getAssetId_fuzz_revertsWith_AssetNotListed(address) (runs: 5, μ: 18584, ~: 18584)
[PASS] test_hub_deploy_reverts_on_InvalidConstructorInput() (gas: 829827)
[PASS] test_hub_max_riskPremium() (gas: 8566)
[PASS] test_isUnderlyingListed() (gas: 1178228)
[PASS] test_updateAssetConfig_NewFeeReceiver_noFees() (gas: 701919)
[PASS] test_updateAssetConfig_UseExistingSpokeAndListedAsFeeReceiver_revertsWith_SpokeAlreadyListed() (gas: 62252)
[PASS] test_updateAssetConfig_fuzz(uint256,(address,uint16,address,address)) (runs: 5, μ: 266359, ~: 266223)
Logs:
  Bound result 2
  Bound result 1805

[PASS] test_updateAssetConfig_fuzz_FromZeroLiquidityFee(uint256,uint16) (runs: 5, μ: 821624, ~: 821518)
Logs:
  Bound result 5
  Bound result 1551
  Bound result 5
  Bound result 0
  Bound result 5
  Bound result 1551

[PASS] test_updateAssetConfig_fuzz_LiquidityFee(uint256,uint16) (runs: 5, μ: 689045, ~: 688939)
Logs:
  Bound result 5
  Bound result 1551
  Bound result 5
  Bound result 1551

[PASS] test_updateAssetConfig_fuzz_NewFeeReceiver(uint256) (runs: 5, μ: 793901, ~: 793901)
Logs:
  Bound result 3
  Bound result 3
  Bound result 1000

[PASS] test_updateAssetConfig_fuzz_NewInterestRateStrategy(uint256) (runs: 5, μ: 662394, ~: 662394)
Logs:
  Bound result 3

[PASS] test_updateAssetConfig_fuzz_ReuseFeeReceiver_revertsWith_SpokeAlreadyListed(uint256) (runs: 5, μ: 837026, ~: 837026)
Logs:
  Bound result 3
  Bound result 3
  Bound result 3
  Bound result 1000

[PASS] test_updateAssetConfig_fuzz_Scenario(uint256) (runs: 5, μ: 712994, ~: 712994)
Logs:
  Bound result 3
  Bound result 3
  Bound result 1000
  Bound result 3
  Bound result 1000
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0
  Bound result 3
  Bound result 0

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidInterestRateStrategy(uint256) (runs: 5, μ: 61074, ~: 61074)
Logs:
  Bound result 3

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidLiquidityFee(uint256,(address,uint16,address,address)) (runs: 5, μ: 40144, ~: 40008)
Logs:
  Bound result 2
  Bound result 1805

[PASS] test_updateAssetConfig_fuzz_revertsWith_InvalidReinvestmentController() (gas: 482818)
[PASS] test_updateAssetConfig_fuzz_revertsWith_calculateInterestRateReverts(uint256,(address,uint16,address,address)) (runs: 5, μ: 192857, ~: 192721)
Logs:
  Bound result 3
  Bound result 1070

[PASS] test_updateAssetConfig_fuzz_revertsWith_setInterestRateDataReverts(uint256,(address,uint16,address,address)) (runs: 5, μ: 96237, ~: 96237)
Logs:
  Bound result 3
  Bound result 6818

[PASS] test_updateAssetConfig_oldFeeReceiver_flags() (gas: 873446)
Logs:
  Bound result 1
  Bound result 500
  Bound result 3
  Bound result 1000
  Bound result 5
  Bound result 500
  Bound result 3
  Bound result 1000

[PASS] test_updateSpokeConfig_fuzz(uint256,(uint40,uint40,uint24,bool,bool)) (runs: 5, μ: 59089, ~: 59054)
Logs:
  Bound result 1

[PASS] test_updateSpokeConfig_fuzz_revertsWith_SpokeNotListed(uint256,address,(uint40,uint40,uint24,bool,bool)) (runs: 5, μ: 40457, ~: 40397)
Logs:
  Bound result 3

[PASS] test_updateSpokeConfig_revertsWith_AssetNotListed() (gas: 29640)
Suite result: ok. 37 passed; 0 failed; 0 skipped; finished in 1.87s (1.84s CPU time)

Ran 40 tests for tests/unit/misc/NativeTokenGateway.t.sol:NativeTokenGatewayTest
[PASS] test_borrowNative() (gas: 662186)
Logs:
  Bound result 5000000000000000000

[PASS] test_borrowNative_fuzz(uint256) (runs: 5, μ: 662633, ~: 662237)
Logs:
  Bound result 9744225747411664895

[PASS] test_borrowNative_revertsWith_InvalidAmount() (gas: 32360)
[PASS] test_borrowNative_revertsWith_NotNativeWrappedAsset() (gas: 32435)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_hubDraw() (gas: 282993)
[PASS] test_borrowNative_revertsWith_ReentrancyGuardReentrantCall_spokeBorrow() (gas: 271094)
[PASS] test_borrowNative_revertsWith_SpokeNotRegistered() (gas: 25340)
[PASS] test_constructor() (gas: 12715)
[PASS] test_constructor_revertsWith_InvalidAddress() (gas: 5958)
[PASS] test_fallback_revertsWith_UnsupportedAction() (gas: 17616)
[PASS] test_receive_revertsWith_UnsupportedAction() (gas: 17408)
[PASS] test_repayNative() (gas: 755100)
Logs:
  Bound result 5000000000000000000

[PASS] test_repayNative_excessAmount() (gas: 673414)
[PASS] test_repayNative_fuzz(uint256) (runs: 5, μ: 755607, ~: 755458)
Logs:
  Bound result 9744225747411664895

[PASS] test_repayNative_fuzz_withInterest(uint256,uint256) (runs: 5, μ: 698419, ~: 679495)
Logs:
  Bound result 49225183759147251094
  Bound result 31541742

[PASS] test_repayNative_revertsWith_InvalidAmount() (gas: 32441)
[PASS] test_repayNative_revertsWith_NativeAmountMismatch() (gas: 30030)
[PASS] test_repayNative_revertsWith_NotNativeWrappedAsset() (gas: 39209)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_hubRestore() (gas: 326311)
[PASS] test_repayNative_revertsWith_ReentrancyGuardReentrantCall_spokeRepay() (gas: 303302)
[PASS] test_repayNative_revertsWith_SpokeNotRegistered() (gas: 38728)
[PASS] test_supplyAndCollateralNative() (gas: 331921)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyAndCollateralNative_fuzz(uint256) (runs: 5, μ: 332221, ~: 331949)
Logs:
  Bound result 702092503229744225747411664895

[PASS] test_supplyNative() (gas: 303659)
Logs:
  Bound result 100000000000000000000

[PASS] test_supplyNative_fuzz(uint256) (runs: 5, μ: 303958, ~: 303686)
Logs:
  Bound result 702092503229744225747411664895

[PASS] test_supplyNative_revertsWith_InvalidAmount() (gas: 32395)
[PASS] test_supplyNative_revertsWith_NativeAmountMismatch() (gas: 30014)
[PASS] test_supplyNative_revertsWith_NotNativeWrappedAsset() (gas: 39175)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_hubAdd() (gas: 374132)
[PASS] test_supplyNative_revertsWith_ReentrancyGuardReentrantCall_spokeSupply() (gas: 336089)
[PASS] test_supplyNative_revertsWith_SpokeNotRegistered() (gas: 38740)
[PASS] test_withdrawNative() (gas: 329096)
Logs:
  Bound result 100000000000000000000

[PASS] test_withdrawNative_fuzz(uint256) (runs: 5, μ: 329440, ~: 329168)
Logs:
  Bound result 702092503229744225747411664895

[PASS] test_withdrawNative_fuzz_allBalance(uint256) (runs: 5, μ: 266402, ~: 266213)
Logs:
  Bound result 702092503229744225747411664895

[PASS] test_withdrawNative_fuzz_allBalanceWithInterest(uint256,uint256) (runs: 5, μ: 614498, ~: 611246)
Logs:
  Bound result 400985017566938267345569888285
  Bound result 128255060557475821010701818479

[PASS] test_withdrawNative_revertsWith_InvalidAmount() (gas: 32457)
[PASS] test_withdrawNative_revertsWith_NotNativeWrappedAsset() (gas: 32490)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_hubRemove() (gas: 299756)
[PASS] test_withdrawNative_revertsWith_ReentrancyGuardReentrantCall_spokeWithdraw() (gas: 271156)
[PASS] test_withdrawNative_revertsWith_SpokeNotRegistered() (gas: 25395)
Suite result: ok. 40 passed; 0 failed; 0 skipped; finished in 717.17ms (693.08ms CPU time)

Ran 3 tests for tests/unit/NoncesKeyed.t.sol:NoncesKeyedTest
[PASS] test_useCheckedNonce_monotonic(bytes32) (runs: 5, μ: 12863, ~: 12863)
[PASS] test_useCheckedNonce_revertsWith_InvalidAccountNonce(bytes32) (runs: 5, μ: 113826, ~: 135841)
[PASS] test_useNonce_monotonic(bytes32) (runs: 5, μ: 13531, ~: 13531)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 28.27ms (26.36ms CPU time)

Ran 10 tests for tests/unit/PercentageMath.t.sol:PercentageMathTests
[PASS] test_constants() (gas: 8604)
[PASS] test_fromBpsDown() (gas: 9654)
[PASS] test_percentDiv() (gas: 14993)
[PASS] test_percentDivUp_ge_value(uint256,uint256) (runs: 5, μ: 15230, ~: 15261)
Logs:
  Bound result 34
  Bound result 4001489475519777892714368177441398361764893722540077576405250493469071667

[PASS] test_percentDivUp_le_value(uint256,uint256) (runs: 5, μ: 15619, ~: 15347)
Logs:
  Bound result 90035
  Bound result 158043496892361332228536126589354016571387317550164480032517780550211133

[PASS] test_percentDiv_fuzz(uint256,uint256) (runs: 5, μ: 12485, ~: 12760)
[PASS] test_percentMul() (gas: 14932)
[PASS] test_percentMulUp_ge_value(uint256,uint256) (runs: 5, μ: 15602, ~: 15330)
Logs:
  Bound result 90035
  Bound result 158043496892361332228536126589354016571387317550164480032517780550211133

[PASS] test_percentMulUp_le_value(uint256,uint256) (runs: 5, μ: 15233, ~: 15264)
Logs:
  Bound result 34
  Bound result 4001489475519777892714368177441398361764893722540077576405250493469071667

[PASS] test_percentMul_fuzz(uint256,uint256) (runs: 5, μ: 11480, ~: 12063)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 56.60ms (56.27ms CPU time)

Ran 15 tests for tests/unit/Spoke/Spoke.RiskPremium.EdgeCases.t.sol:SpokeRiskPremiumEdgeCasesTest
[PASS] test_riskPremium_borrowingMoreIncreasesRP() (gas: 1856142)
Logs:
  Bound result 50000000000000000000000
  Bound result 1000000000000000000000

[PASS] test_riskPremium_changesAfterAccrual() (gas: 2137752)
Logs:
  Bound result 100000000000000000000
  Bound result 31536000

[PASS] test_riskPremium_decreasesAfterCollateralAccrual() (gas: 2314474)
Logs:
  Bound result 1000000000000000000000
  Bound result 31536000

[PASS] test_riskPremium_fuzz_borrowingMoreNonDecreasesRP(uint256,uint256) (runs: 5, μ: 1837853, ~: 1837928)
Logs:
  Bound result 400985017566938267345569888285
  Bound result 21830

[PASS] test_riskPremium_fuzz_changesAfterAccrual(uint256,uint40) (runs: 5, μ: 2139142, ~: 2139464)
Logs:
  Bound result 457665205198880149128615116
  Bound result 832485831

[PASS] test_riskPremium_fuzz_increasesAfterDebtAccrual(uint256,uint40) (runs: 5, μ: 1870814, ~: 1871136)
Logs:
  Bound result 457665205198880149128615116
  Bound result 832485831

[PASS] test_riskPremium_fuzz_nonDecreasingAfterWithdrawal(uint256,uint256,uint256) (runs: 5, μ: 1250455, ~: 1253917)
Logs:
  Bound result 28440373319405028386003002998
  Bound result 276197703734924979325426575862
  Bound result 4896747

[PASS] test_riskPremium_fuzz_nonIncreasesAfterCollateralAccrual(uint256,uint40) (runs: 5, μ: 2315728, ~: 2315943)
Logs:
  Bound result 154303979702796634652662230263
  Bound result 832485831

[PASS] test_riskPremium_fuzz_supplyingLowerCRCollateral_nonIncreasesRP(uint256,uint256) (runs: 5, μ: 1544127, ~: 1540993)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 21830

[PASS] test_riskPremium_increasesAfterDebtAccrual() (gas: 1888061)
Logs:
  Bound result 50000000000000000000000
  Bound result 31536000

[PASS] test_riskPremium_increasesAfterWithdrawal(uint256,uint256) (runs: 5, μ: 1174212, ~: 1174050)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 21830
  Bound result 72003609882796634652662230263
  Bound result 21830
  Bound result 72003609882796634652662230263

[PASS] test_riskPremium_nonDecreasesAfterCollateralRemoval(uint256,uint256) (runs: 5, μ: 1468362, ~: 1468200)
Logs:
  Bound result 72003609882796634652662230263
  Bound result 21830

[PASS] test_riskPremium_nonIncreasingAfterRepay(uint256,uint256,uint256,uint256) (runs: 5, μ: 1483608, ~: 1486485)
Logs:
  Bound result 433606845766853651522216947804
  Bound result 154285589657018366648870226275
  Bound result 240336
  Bound result 18854884467880058033161996847

[PASS] test_riskPremium_priceChangeReducesRP(uint256,uint256) (runs: 5, μ: 2142110, ~: 2142325)
Logs:
  Bound result 83673407040785021412243346365
  Bound result 9999999900021830

[PASS] test_riskPremium_supplyingLowerCRCollateral_decreasesRP() (gas: 1557083)
Logs:
  Bound result 100000000
  Bound result 10000000000000000000000

Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 1.19s (1.17s CPU time)

Ran 17 tests for tests/unit/Spoke/Spoke.Borrow.HealthFactor.t.sol:SpokeBorrowHealthFactorTest
[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_collateral_price_drop(uint256,uint256) (runs: 5, μ: 907285, ~: 907422)
Logs:
  Bound result 11538
  Bound result 72003609882796634652662230263

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls(uint256,uint256) (runs: 5, μ: 852596, ~: 852752)
Logs:
  Bound result 148243438086795299587
  Bound result 6413955

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest(uint256,uint256,uint256) (runs: 5, μ: 896401, ~: 896392)
Logs:
  Bound result 16808
  Bound result 11100
  Bound result 849909999

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts(uint256,uint256) (runs: 5, μ: 1092462, ~: 1092541)
Logs:
  Bound result 7283647803336944687374883
  Bound result 99999999999000000000011539

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest(uint256,uint256,uint256) (runs: 5, μ: 1147086, ~: 1147213)
Logs:
  Bound result 75163410361181780817854932
  Bound result 150713495780544581386963296478
  Bound result 204710882

[PASS] test_borrow_fuzz_revertsWith_HealthFactorBelowThreshold_with_interest(uint256,uint256) (runs: 5, μ: 677772, ~: 677500)
Logs:
  Bound result 1156
  Bound result 11511

[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold() (gas: 637900)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_collateral_price_drop_weth() (gas: 901672)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls() (gas: 846534)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai() (gas: 1119844)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth() (gas: 1119888)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_with_interest() (gas: 891423)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts() (gas: 1084782)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_multiple_debts_with_interest() (gas: 1138879)
[PASS] test_borrow_revertsWith_HealthFactorBelowThreshold_with_interest() (gas: 672888)
[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_dai(uint256,uint256,uint256) (runs: 5, μ: 1123802, ~: 1124010)
Logs:
  Bound result 200000000
  Bound result 532
  Bound result 3363

[PASS] test_fuzz_borrow_revertsWith_HealthFactorBelowThreshold_multiple_colls_collateral_price_drop_weth(uint256,uint256,uint256) (runs: 5, μ: 1124399, ~: 1124390)
Logs:
  Bound result 200000000
  Bound result 532
  Bound result 3363

Suite result: ok. 17 passed; 0 failed; 0 skipped; finished in 809.44ms (786.25ms CPU time)

Ran 4 tests for tests/unit/Spoke/Spoke.RiskPremium.Scenario.t.sol:SpokeRiskPremiumScenarioTest
[PASS] test_getUserRiskPremium_applyInterest_two_users_two_reserves_borrowed() (gas: 3279769)
[PASS] test_getUserRiskPremium_fuzz_inflight_calcs((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint40) (runs: 5, μ: 2473303, ~: 2515027)
Logs:
  Bound result 8302
  Bound result 732
  Bound result 2788
  Bound result 19274378306194969
  Bound result 259200000
  Bound result 255
  Bound result 65
  Bound result 16386
  Bound result 92799993

[PASS] test_getUserRiskPremium_fuzz_two_users_two_reserves_borrowed((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint16,uint16,uint40[3]) (runs: 5, μ: 2975401, ~: 3136180)
Logs:
  Bound result 141149748172405968291488280632
  Bound result 31131513872998857787324068111
  Bound result 299067823585765659
  Bound result 69023460664384170
  Bound result 63121
  Bound result 16687
  Bound result 319856857614133106
  Bound result 84384526
  Bound result 195
  Bound result 0
  Bound result 503626500
  Bound result 301638927
  Bound result 21028704

[PASS] test_riskPremiumPropagatesCorrectly_singleBorrow() (gas: 1981231)
Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 323.16ms (298.98ms CPU time)

Ran 16 tests for tests/unit/Hub/Hub.Draw.t.sol:HubDrawTest
[PASS] test_draw_DifferentSpokes() (gas: 361837)
[PASS] test_draw_fuzz_IncreasedBorrowRate(uint256,uint256) (runs: 5, μ: 712900, ~: 712770)
Logs:
  Bound result 3
  Bound result 10550

[PASS] test_draw_fuzz_amounts_same_block(uint256,uint256) (runs: 5, μ: 292614, ~: 292486)
Logs:
  Bound result 3
  Bound result 10550

[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded(uint40) (runs: 5, μ: 82366, ~: 82366)
Logs:
  Bound result 8753

[PASS] test_draw_fuzz_revertsWith_DrawCapExceeded_due_to_interest(uint40,uint256,uint256) (runs: 5, μ: 293588, ~: 293316)
Logs:
  Bound result 476358262
  Bound result 75862
  Bound result 4896747

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity(uint256,uint256) (runs: 5, μ: 34736, ~: 34660)
Logs:
  Bound result 3
  Bound result 10550

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_draw(uint256) (runs: 5, μ: 171508, ~: 171372)
Logs:
  Bound result 8753

[PASS] test_draw_fuzz_revertsWith_InsufficientLiquidity_due_to_remove(uint256) (runs: 5, μ: 133092, ~: 132999)
Logs:
  Bound result 8753

[PASS] test_draw_fuzz_revertsWith_InvalidAddress(uint256) (runs: 5, μ: 16126, ~: 16126)
[PASS] test_draw_revertsWith_DrawCapExceeded_due_to_deficit() (gas: 269073)
[PASS] test_draw_revertsWith_InsufficientLiquidity() (gas: 28459)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_draw() (gas: 167982)
[PASS] test_draw_revertsWith_InsufficientLiquidity_due_to_remove() (gas: 130336)
[PASS] test_draw_revertsWith_InvalidAmount() (gas: 16257)
[PASS] test_draw_revertsWith_SpokeHalted() (gas: 61330)
[PASS] test_draw_revertsWith_SpokeNotActive() (gas: 61269)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 655.73ms (632.00ms CPU time)

Ran 8 tests for tests/unit/Hub/Hub.EliminateDeficit.t.sol:HubEliminateDeficitTest
[PASS] test_eliminateDeficit(uint256) (runs: 5, μ: 668283, ~: 668283)
[PASS] test_eliminateDeficit_fuzz_revertsWith_AccessManagedUnauthorized(address) (runs: 5, μ: 32536, ~: 32536)
[PASS] test_eliminateDeficit_fuzz_revertsWith_ArithmeticUnderflow_CallerSpokeNoFunds(uint256) (runs: 5, μ: 354628, ~: 354628)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountNoDeficit() (gas: 36013)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_ZeroAmountWithDeficit() (gas: 350991)
[PASS] test_eliminateDeficit_revertsWith_InvalidAmount_on_UnregisteredCoveredSpoke() (gas: 36400)
[PASS] test_eliminateDeficit_revertsWith_SpokeNotActive_on_UnregisteredAsset() (gas: 384254)
[PASS] test_eliminateDeficit_revertsWith_callerSpokeNotActive() (gas: 159268)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 275.29ms (251.15ms CPU time)

Ran 8 tests for tests/gas/Hub.Operations.gas.t.sol:HubOperations_Gas_Tests
[PASS] test_add() (gas: 269012)
[PASS] test_deficit() (gas: 1339797)
[PASS] test_draw() (gas: 381462)
[PASS] test_payFee_transferShares() (gas: 923919)
[PASS] test_refreshPremium() (gas: 629334)
[PASS] test_remove() (gas: 340398)
[PASS] test_restore() (gas: 845756)
[PASS] test_restore_with_transfer() (gas: 846399)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 51.16ms (7.31ms CPU time)

Ran 6 tests for tests/unit/Spoke/Spoke.Borrow.Scenario.t.sol:SpokeBorrowScenarioTest
[PASS] test_borrow_fuzz_multi_spoke_multi_reserves(uint256,uint256,uint256,uint256,uint256) (runs: 5, μ: 2170760, ~: 2171019)
Logs:
  Bound result 1379859933655610741298793405
  Bound result 13201078635605084377043354411
  Bound result 84519284290024108340955650084
  Bound result 97283324062632509970348013685
  Bound result 80267547

[PASS] test_borrow_fuzz_single_spoke_multi_reserves(uint256,uint256,uint256,uint256) (runs: 5, μ: 2319717, ~: 2320031)
Logs:
  Bound result 240336
  Bound result 52598354835191513996053612962
  Bound result 78567410690749811
  Bound result 14406338595446304349

[PASS] test_borrow_fuzz_single_spoke_multi_reserves_multi_user(uint256,uint256,uint256,uint256) (runs: 5, μ: 2725719, ~: 2725980)
Logs:
  Bound result 240336
  Bound result 210969655735530016
  Bound result 859...*[Comment body truncated]*

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

♻️ Forge Gas Snapshots

Path Value
snapshots/Hub.Operations.json
add ↑12% (+9118) 85,750
add: with transfer ↑8% (+9106) 124,135
draw ↑14% (+12377) 103,165
eliminateDeficit: full ↑8% (+6279) 88,686
eliminateDeficit: partial ↑7% (+6279) 98,291
payFee ↑3% (+2467) 73,283
refreshPremium ↑12% (+9267) 88,703
remove: full ↑10% (+9079) 96,853
remove: partial ↑10% (+9079) 96,853
reportDeficit ↑8% (+9577) 127,216
restore: full ↑16% (+12377) 89,048
restore: full - with transfer ↑8% (+12721) 182,001
restore: partial ↑15% (+12377) 97,650
restore: partial - with transfer ↑9% (+12365) 155,618
transferShares ↑13% (+9267) 78,897
mintFeeShares 85,552
snapshots/NativeTokenGateway.Operations.json
borrowNative ↑5% (+11825) 244,018
repayNative ↑7% (+12551) 183,001
supplyAsCollateralNative ↓1% (-1180) 163,349
supplyNative ↓1% (-944) 138,352
withdrawNative: full ↓1% (-1143) 128,118
withdrawNative: partial ↓1% (-1429) 139,947
snapshots/SignatureGateway.Operations.json
borrowWithSig ↑5% (+11825) 229,073
repayWithSig ↑7% (+12551) 203,261
supplyWithSig ↑5% (+7294) 164,876
updateUserDynamicConfigWithSig ↑0% (+486) 102,055
updateUserRiskPremiumWithSig ↑0% (+486) 100,892
withdrawWithSig ↑5% (+9355) 188,132
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 1, borrows: 0 ↓0% (-210) 49,384
getUserAccountData: supplies: 2, borrows: 0 ↓1% (-420) 81,040
getUserAccountData: supplies: 2, borrows: 1 ↓0% (-333) 101,176
getUserAccountData: supplies: 2, borrows: 2 ↓0% (-246) 125,557
snapshots/Spoke.Operations.ZeroRiskPremium.json
borrow: first ↑6% (+12254) 202,806
borrow: second action, same reserve ↑7% (+12254) 182,482
liquidationCall (receiveShares): full ↑4% (+10596) 296,735
liquidationCall (receiveShares): partial ↑4% (+10596) 296,153
liquidationCall (reportDeficit): full ↑3% (+9686) 381,685
liquidationCall: full ↑3% (+9682) 330,557
liquidationCall: partial ↑3% (+9682) 329,975
permitReserve + repay (multicall) ↑7% (+12464) 185,984
permitReserve + supply (multicall) ↑6% (+9118) 162,859
permitReserve + supply + enable collateral (multicall) ↓0% (-484) 167,698
repay: full ↑9% (+12464) 145,712
repay: partial ↑9% (+12464) 145,032
supply + enable collateral (multicall) ↑7% (+9118) 140,390
supply: 0 borrows, collateral disabled ↓1% (-1180) 126,106
supply: 0 borrows, collateral enabled ↑8% (+9118) 121,942
supply: second action, same reserve ↓1% (-1180) 109,006
updateUserRiskPremium: 1 borrow ↓0% (-123) 95,589
updateUserRiskPremium: 2 borrows ↑1% (+660) 106,052
usingAsCollateral: 1 borrow, disable ↓0% (-123) 105,633
usingAsCollateral: 2 borrows, disable ↓0% (-36) 127,269
withdraw: 0 borrows, full ↓1% (-1429) 126,526
withdraw: 0 borrows, partial ↓1% (-1639) 135,864
withdraw: 1 borrow, partial ↓1% (-1552) 158,430
withdraw: 2 borrows, partial ↓1% (-1465) 180,054
withdraw: non collateral ↑9% (+9565) 120,777
snapshots/Spoke.Operations.json
borrow: first ↑5% (+11825) 271,312
borrow: second action, same reserve ↑6% (+11825) 213,988
liquidationCall (receiveShares): full ↑3% (+10167) 328,350
liquidationCall (receiveShares): partial ↑3% (+10167) 327,768
liquidationCall (reportDeficit): full ↑3% (+9686) 385,902
liquidationCall: full ↑3% (+9253) 362,172
liquidationCall: partial ↑3% (+9253) 361,590
permitReserve + repay (multicall) ↑7% (+12464) 194,463
permitReserve + supply (multicall) ↑6% (+9118) 162,859
permitReserve + supply + enable collateral (multicall) ↓0% (-484) 167,698
repay: full ↑9% (+12464) 149,391
repay: partial ↑9% (+12464) 153,511
supply + enable collateral (multicall) ↑7% (+9118) 140,390
supply: 0 borrows, collateral disabled ↓1% (-1180) 126,106
supply: 0 borrows, collateral enabled ↑8% (+9118) 121,942
supply: second action, same reserve ↓1% (-1180) 109,006
updateUserRiskPremium: 1 borrow ↑6% (+9231) 158,302
updateUserRiskPremium: 2 borrows ↑10% (+19368) 218,701
usingAsCollateral: 1 borrow, disable ↑6% (+9231) 168,343
usingAsCollateral: 2 borrows, disable ↑8% (+18672) 247,914
withdraw: 0 borrows, full ↓1% (-1429) 126,526
withdraw: 0 borrows, partial ↓1% (-1639) 135,864
withdraw: 1 borrow, partial ↑4% (+7802) 218,638
withdraw: 2 borrows, partial ↑6% (+17243) 298,197
withdraw: non collateral ↑9% (+9565) 120,777
🔕 Unchanged
Path Value
snapshots/SignatureGateway.Operations.json
setSelfAsUserPositionManagerWithSig 75,385
setUsingAsCollateralWithSig 58,546
snapshots/Spoke.Getters.json
getUserAccountData: supplies: 0, borrows: 0 12,992
snapshots/Spoke.Operations.ZeroRiskPremium.json
setUserPositionManagersWithSig: disable 47,051
setUserPositionManagersWithSig: enable 68,951
updateUserDynamicConfig: 1 collateral 74,523
updateUserDynamicConfig: 2 collaterals 89,391
usingAsCollateral: 0 borrows, enable 59,594
usingAsCollateral: 1 borrow, enable 42,482
usingAsCollateral: 2 borrows, enable 42,494
snapshots/Spoke.Operations.json
setUserPositionManagersWithSig: disable 47,051
setUserPositionManagersWithSig: enable 68,951
updateUserDynamicConfig: 1 collateral 74,523
updateUserDynamicConfig: 2 collaterals 89,391
usingAsCollateral: 0 borrows, enable 59,594
usingAsCollateral: 1 borrow, enable 42,482
usingAsCollateral: 2 borrows, enable 42,494

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Forge Build Sizes

Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
Hub ↑1% (+225) 23,772 ↑1% (+225) 23,969 ↓22% (-225) 804 ↓1% (-225) 25,183
🔕 Unchanged
Contract Runtime Size (B) Initcode Size (B) Runtime Margin (B) Initcode Margin (B)
AaveOracle 2,834 3,488 21,742 45,664
AccessManager 12,985 14,210 11,591 34,942
AccessManagerEnumerable 16,881 18,699 7,695 30,453
Address 44 94 24,532 49,058
Arrays 44 94 24,532 49,058
Arrays.hub 16 44 24,560 49,108
Arrays.spoke 16 44 24,560 49,108
AssetInterestRateStrategy 2,704 2,889 21,872 46,263
AssetLogic 44 94 24,532 49,058
AssetLogic.hub 16 44 24,560 49,108
AuthorityUtils 44 94 24,532 49,058
AuthorityUtils.hub 16 44 24,560 49,108
AuthorityUtils.spoke 16 44 24,560 49,108
Bytes 44 94 24,532 49,058
Bytes.spoke 16 44 24,560 49,108
Comparators 44 94 24,532 49,058
Comparators.hub 16 44 24,560 49,108
Comparators.spoke 16 44 24,560 49,108
Constants 499 551 24,077 48,601
Create2Utils 134 184 24,442 48,968
DeployUtils 44 94 24,532 49,058
DeployWrapper 3,330 3,358 21,246 45,794
ECDSA 44 94 24,532 49,058
ECDSA.spoke 16 44 24,560 49,108
EIP712Hash (src/position-manager/libraries/EIP712Hash.sol) 441 493 24,135 48,659
EIP712Hash (src/spoke/libraries/EIP712Hash.sol) 171 221 24,405 48,931
EIP712Hash.spoke 166 194 24,410 48,958
EIP712Types 44 94 24,532 49,058
ERC1967Proxy 135 891 24,441 48,261
ERC1967Utils 44 94 24,532 49,058
EnumerableSet 44 94 24,532 49,058
EnumerableSet.hub 16 44 24,560 49,108
Errors 44 94 24,532 49,058
ExtSloadWrapper 394 422 24,182 48,730
GatewayBaseWrapper 2,400 2,675 22,176 46,477
Hashes 44 94 24,532 49,058
HubConfigurator 13,833 14,029 10,743 35,123
JsonBindings 12,853 12,905 11,723 36,247
KeyValueList 44 94 24,532 49,058
KeyValueList.spoke 16 44 24,560 49,108
KeyValueListWrapper 957 985 23,619 48,167
LibBit 44 94 24,532 49,058
LibBit.spoke 16 44 24,560 49,108
LiquidationLogic 12,318 12,370 12,258 36,782
LiquidationLogic.spoke 9,772 9,804 14,804 39,348
LiquidationLogicWrapper 18,567 18,741 6,009 30,411
LowLevelCall 44 94 24,532 49,058
Math 44 94 24,532 49,058
Math.hub 16 44 24,560 49,108
Math.spoke 16 44 24,560 49,108
MathUtils 44 94 24,532 49,058
MathUtils.hub 16 44 24,560 49,108
MathUtils.spoke 16 44 24,560 49,108
MockERC1271Wallet 828 962 23,748 48,190
MockERC20 2,540 3,006 22,036 46,146
MockNoncesKeyed 858 886 23,718 48,266
MockPriceFeed 737 1,395 23,839 47,757
MockReentrantCaller 882 1,083 23,694 48,069
MockSkimSpoke 1,116 1,275 23,460 47,877
NativeTokenGateway 6,187 6,604 18,389 42,548
NoncesKeyed 644 672 23,932 48,480
NoncesKeyed.spoke 387 413 24,189 48,739
Panic 44 94 24,532 49,058
Panic.hub 16 44 24,560 49,108
Panic.spoke 16 44 24,560 49,108
PercentageMath 44 94 24,532 49,058
PercentageMath.hub 16 44 24,560 49,108
PercentageMath.spoke 16 44 24,560 49,108
PercentageMathWrapper 632 660 23,944 48,492
PositionStatusMap 44 94 24,532 49,058
PositionStatusMap.spoke 16 44 24,560 49,108
PositionStatusMapWrapper 3,341 3,369 21,235 45,783
Premium 44 94 24,532 49,058
Premium.hub 16 44 24,560 49,108
Premium.spoke 16 44 24,560 49,108
ProxyAdmin 1,320 1,556 23,256 47,596
RescuableWrapper 908 1,042 23,668 48,110
ReserveFlagsMap 44 94 24,532 49,058
ReserveFlagsMap.spoke 16 44 24,560 49,108
ReserveFlagsMapWrapper 928 956 23,648 48,196
Roles 218 269 24,358 48,883
SafeCast 44 94 24,532 49,058
SafeCast.hub 16 44 24,560 49,108
SafeCast.spoke 16 44 24,560 49,108
SafeERC20 44 94 24,532 49,058
SafeERC20.hub 16 44 24,560 49,108
SafeERC20.spoke 16 44 24,560 49,108
SharesMath 44 94 24,532 49,058
SharesMath.hub 16 44 24,560 49,108
SignatureChecker 44 94 24,532 49,058
SignatureChecker.spoke 16 44 24,560 49,108
SignatureGateway 11,485 12,024 13,091 37,128
SlotDerivation 44 94 24,532 49,058
SlotDerivation.hub 16 44 24,560 49,108
SlotDerivation.spoke 16 44 24,560 49,108
SpokeConfigurator 12,328 12,524 12,248 36,628
SpokeInstance 24,193 25,000 383 24,152
SpokeUtils 96 146 24,480 49,006
SpokeUtils.spoke 71 99 24,505 49,053
SpokeUtilsWrapper 1,827 1,855 22,749 47,297
StorageSlot 44 94 24,532 49,058
StorageSlot.hub 16 44 24,560 49,108
StorageSlot.spoke 16 44 24,560 49,108
TestnetERC20 3,649 4,525 20,927 44,627
Time 44 94 24,532 49,058
TransientSlot 44 94 24,532 49,058
TransientSlot.spoke 16 44 24,560 49,108
TransparentUpgradeableProxy 1,419 4,078 23,157 45,074
TreasurySpoke 3,599 4,014 20,977 45,138
UnitPriceFeed 777 1,771 23,799 47,381
UserPositionUtils (src/spoke/libraries/UserPositionDebt.sol) 44 94 24,532 49,058
UserPositionUtils (src/spoke/libraries/UserPositionUtils.sol) 44 94 24,532 49,058
UserPositionUtils.spoke 16 44 24,560 49,108
UserPositionUtilsWrapper (tests/mocks/UserPositionDebtWrapper.sol) 3,263 3,291 21,313 45,861
UserPositionUtilsWrapper (tests/mocks/UserPositionUtilsWrapper.sol) 3,263 3,291 21,313 45,861
Utils 44 94 24,532 49,058
WETH9 2,148 2,614 22,428 46,538
WadRayMath 44 94 24,532 49,058
WadRayMath.hub 16 44 24,560 49,108
WadRayMath.spoke 16 44 24,560 49,108
WadRayMathWrapper 1,514 1,542 23,062 47,610

@yan-man yan-man changed the title Rft/mint fee shares 2 gas fix: gas tests with interest accrual (1186 vs dev) Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants